import { BrowserRouter as Router,Route ,Redirect } from "react-router-dom"
//导入首页和城市选择两个组件，页面
import Home from "./pages/Home";
import CityList from "./pages/CityList"
import React from "react";

function App() {
  return (
      <Router>

    <div className="App">
      {/*项目组件<Button type="primary">登录按钮</Button>*/}
      {/*项目组件<Button type="dashed">注册按钮</Button>*/}
        {/*配置重定向菜单*/}
        <Route  path="/" exact render={()=><Redirect to="/home" />}/>
        {/*配置路由*/}
        <Route path="/home"  component={Home}></Route>
        <Route path="/citylist" component={CityList}></Route>
    </div>
      </Router>

  );
}

export default App;
